#include"comm.hpp"
int main()
{
    int shmid = CreateShm();
    char* shmaddr = (char*)shmat(shmid, nullptr, 0);
    
    struct shmid_ds shmds;
    while(true)
    {
        cout<<"client say@ " << shmaddr << endl;
        sleep(1);
        shmctl(shmid, IPC_STAT, &shmds);
        cout << shmds.shm_segsz << endl;
    }
    
    shmdt(shmaddr);
    shmctl(shmid, IPC_RMID, nullptr);
    return 0;
}